home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7180 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.bridge.net!news
  2. From: David Byrden <100101.2547@compuserve.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: I need some help with a homework
  5. Date: 22 Feb 1996 04:32:34 GMT
  6. Organization: self-employed
  7. Message-ID: <4ggrl2$fg3@news.bridge.net>
  8. References: <4g8o4f$m93@ixnews7.ix.netcom.com>
  9. NNTP-Posting-Host: ppp-mia1-49.bridge.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  14.  
  15.  
  16. >> I need some help with this simple program for some but, very 
  17. >> difficult for me.
  18.  
  19. Leonel;
  20.  
  21.   Take a pencil and paper.
  22.  
  23.   Start at the start of "main" and work your way down slowly through the 
  24. statements of the program.
  25.  
  26.   At each statement, let you do exactly what the computer would do. If it 
  27. is a variable declaration, let you draw a box on the paper and write the 
  28. variable's name over it. If it puts a value in a variable, let you put a 
  29. number in the appropriate box. If it is an "if" statement, let you decide 
  30. which way to go, etc etc.
  31.  
  32.   After a while, you will find a place where the computer does something 
  33. which is not what you want it to do. You will then be able to alter the 
  34. program. I assure you tha you already know enough C++ to write it 
  35. correctly.
  36.  
  37.   One could simply point out the error to you, but I believe that one 
  38. learns by doing.
  39.  
  40.                                David
  41.  
  42.  
  43.